package com.chanyachting.emall.domain;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;

import com.chanyachting.emall.dao.CompanyDAO;
import com.chanyachting.emall.domain.base.BaseCompany;

/**
 * This is the object class that relates to the company table.
 * Any customizations belong here.
 */
public class Company extends BaseCompany {

/*[CONSTRUCTOR MARKER BEGIN]*/
	public Company () {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public Company (java.lang.Integer _id) {
		super(_id);
		
		Company com=(Company)new CompanyDAO().load(Company.class, _id);
		
		if(com!=null){
			
			try {
				BeanUtils.copyProperties(this, com);
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}

	/**
	 * Constructor for required fields
	 */
	public Company (
		java.lang.Integer _id,
		java.lang.String _firstAddress,
		java.lang.String _businessTypeId,
		java.lang.String _businessCategoryId,
		java.lang.String _companyType,
		java.lang.String _companyCreateDate,
		java.lang.String _createDate) {

		super (
			_id,
			_firstAddress,
			_businessTypeId,
			_businessCategoryId,
			_companyType,
			_companyCreateDate,
			_createDate);
	}
/*[CONSTRUCTOR MARKER END]*/
}